import upload from '@/utils/upload'
import request from '@/utils/request'
import store from '@/store/index.js'


// 获取当天的运动数据
export function getTodayProgress(data) {
	return request({
		url: '/sports-data/today',
		method: 'get',
		data: data
	})
}

// 设置当天的运动数据
export function setTodayProgress(data) {
	return request({
		url: '/sports-data/today',
		method: 'put',
		data: data
	})
}

// 获取本周的运动数据
export function getWeekProgress(data) {
	return request({
		url: '/sports-data/weekly',
		method: 'get',
		data: data
	})
}

// 获取设置的数据
export function getSettings(data) {
	return request({
		url: '/settings',
		method: 'get',
		data: data
	})
}

// 设置设置的数据
export function setSettings(data) {
	return request({
		url: '/settings',
		method: 'post',
		data: data
	})
}